/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 * Description: AHCI driver Vendor Hooks
 */

#ifdef CONFIG_NETBIOS_AHCI_SPEC

#ifndef LIB_AHCI_EXT_H
#define LIB_AHCI_EXT_H
#include "ahci.h"
#include "libata.h"
void trace_ahci_vendor_init(void);
void trace_ahci_port_irq_setup(struct ata_port *ap);
void trace_ahci_power_ctrl(void);
void trace_ahci_port_eti_record(struct ata_port *ap);
void trace_ahci_reset_times_count(bool *online);
void trace_ahci_reset_port(unsigned int port);
void trace_ahci_disable_hbus_irq(struct ahci_port_priv *pp);
#endif

#else

struct ata_port;
struct ahci_port_priv;
#define TP_PROTO(args...)	args
#define DECLARE_AHCIFUNC_NOP(name, proto, args)	\
	static inline void trace_##name(proto)		\
	{ }

DECLARE_AHCIFUNC_NOP(ahci_vendor_init,
	TP_PROTO(void),
	TP_ARGS());

DECLARE_AHCIFUNC_NOP(ahci_port_irq_setup,
	TP_PROTO(struct ata_port *ap),
	TP_ARGS(ap));

DECLARE_AHCIFUNC_NOP(ahci_power_ctrl,
	TP_PROTO(void),
	TP_ARGS());

DECLARE_AHCIFUNC_NOP(ahci_port_eti_record,
	TP_PROTO(struct ata_port *ap),
	TP_ARGS(ap));

DECLARE_AHCIFUNC_NOP(ahci_reset_times_count,
	TP_PROTO(bool *online),
	TP_ARGS(online));

DECLARE_AHCIFUNC_NOP(ahci_reset_port,
	TP_PROTO(unsigned int port),
	TP_ARGS(port));

DECLARE_AHCIFUNC_NOP(ahci_disable_hbus_irq,
	TP_PROTO(struct ahci_port_priv *pp),
	TP_ARGS(pp));
#endif
